<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let a = [1, 3, 5, 7, 9]

        a.push('6')//基于push，末尾追加一项

        a[a.length] = 40 //基于原生js,末尾追加一项

        a.splice(a.length, 0, 80)//基于splice末尾追加一项


    </script>
</body>

</html>